const {Category} = require('../../models/Category');

module.exports = async (req, res) => {
    try{
        const category = await Category.find();
        res.send({errorCode:"0",msg:"success",data:{category:category}});
    }catch(e){
        console.log(e)
        res.status(500).send({errCode:"1",msg:"服务器内部错误"})
    }
	
}